import {localeProps} from '../../utils';

const name = 'jd-col';

export default {
    name,
    label: '格子',
    drag: true,
    dragBtn: false,
    inside: true,
    mask: false,
    children: '',
    childrenLen: 2,
    rule() {
        return {
            type: 'el-col',
            props: {span: 12},
            children: []
        };
    },
    props(_, {t}) {
        return localeProps(t, name + '.props', [
            {
                type: 'select',
                field: 'span',
                title: '栅格列数',
                value: 12,
                options: [
                    {label: '平分(12栅格)', value: 12}, 
                    {label: '三等分(8栅格)', value: 8}, 
                    {label: '四等分(6栅格)',value: 6}, 
                ]
            }, 
            // {
            //     type: 'slider', 
            //     field: 'span', 
            //     title: '栅格列数', 
            //     value: 12, 
            //     props: {
            //         min: 6, 
            //         max: 24, 
            //         step: 6,
            //         'show-stops': true,
            //         'format-tooltip': function(value){
            //             return value + "栅格";
            //         }
            //     }
            // },
            // {type: 'slider', field: 'offset', title: '栅格左侧的间隔格数', props: {min: 0, max: 12, step: 2,'show-stops': true,}},
            // {type: 'slider', field: 'push', title: '栅格向右移动格数', props: {min: 0, max: 12, step: 2,'show-stops': true,}},
            // {type: 'slider', field: 'pull', title: '栅格向左移动格数', props: {min: 0, max: 12, step: 2,'show-stops': true,}}
        ]);
    }
};
